<?php


namespace app\student\model;

use think\Db;

class CourseModel
{


    public static function selectCourseModel()
    {
        $result = Db::table('s_course')->select();
        return $result;
    }


    public static function insertCourseModel(array $insert)
    {
        $result = Db::table('s_course')->insert($insert);
        return $result;
    }

    public static function deleteCourseModel(array $where)
    {
        $result = Db::table('s_course')->where($where)->delete();
        return $result;
    }

    public static function GetCourseModel(array $get)
    {
        $result = Db::table('s_course')->get($get);
        return $result;
    }

    public static function updateCourse(array $update)
    {
        $result = Db::table('s_course')->update(['name'=>$update['name'],'id'=>$update['id']]);
        return $result;
    }
}